const { defineConfig } = require("@vue/cli-service");
const port = process.env.VUE_APP_PORT || 8088 || 8081 || 8082 // dev port

module.exports = defineConfig({
  publicPath: process.env.BASE_URL, // 本地开发用
  outputDir: 'dist',
  assetsDir: 'static',
  lintOnSave: false,
  transpileDependencies: true,
  devServer: {
    port: port,
    open: false,
    // // before: require('./mock/mock-server.js')
  proxy: {
    '/test': {
      target: process.env.VUE_APP_BASE_URL,
      ws: false,
      //secure:false,
      changeOrigin: true,
      pathRewrite: {
        '^/test': '',
      },
    },
  },
  }
});
